package com.sum.tea.viewmodel

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.blankj.utilcode.util.ToastUtils
import com.sum.common.bean.ReadMode
import com.sum.common.bean.ReaderExt
import com.sum.common.bean.Stats
import com.sum.common.bean.TagInfo
import com.sum.common.inter.OnInventoryListener
import com.sum.common.manager.UHFManager
import com.sum.common.utils.LogU
import kotlinx.coroutines.launch
import java.util.Collections

class LabelViewModel : BaseViewModel() {

    fun setSingleLabelMode(enabled: Boolean) {
        UHFManager.getInstance().currentManager.setSingleLabelMode(enabled)
    }

    fun setGroupTidMode(enabled: Boolean) {
        UHFManager.getInstance().currentManager.setGroupTidMode(enabled)
    }

    // 清除标签列表
    override fun onCleared() {
        super.onCleared()
        stopReading()
    }
}